﻿@using DevM.Web.Models.Common.Modals
@model DevM.Web.Models.Projects.EditEnvironmentViewModel
@{
    Layout = null;
}
@await Html.PartialAsync("~/Views/Shared/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(L("EditEnvironment")))

<div class="modal-body">
    <form name="EnvironmentEditForm" role="form" novalidate class="form-validation">
        <input type="hidden" name="Id" value="@Model.Environment.Id" />
        <ul class="nav nav-tabs tab-nav-right" role="tablist">
            <li role="presentation" class="active"><a href="#edit-environment-details" data-toggle="tab">@L("EnvironmentDetails")</a></li>
        </ul>
        <div class="tab-content">
            <div role="tabpanel" class="tab-pane animated fadeIn active" id="edit-environment-details">
                <div class="row clearfix" style="margin-top:10px;">
                    <div class="col-sm-12">
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input class="form-control" type="text" name="Name" value="@Model.Environment.Name" required maxlength="200" minlength="2">
                                <label class="form-label">@L("Name")</label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row clearfix" style="margin-top:10px;">
                    <div class="col-sm-12">
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input class="form-control" type="text" name="Host" value="@Model.Environment.Host"  maxlength="200" minlength="2">
                                <label class="form-label">@L("Host")</label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row clearfix">
                    <div class="col-sm-12">
                        <div class="form-group form-float">
                            <div class="form-line">
                                <textarea type="text" name="DbConnectStr" class="form-control" maxlength="2000"> @Model.Environment.DbConnectStr</textarea>
                                <label class="form-label">@L("DbConnectStr")</label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row clearfix">
                    <div class="col-sm-6">
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input id="name" type="text" name="DbType" maxlength="32" value="@Model.Environment.DbType"  class="validate form-control">
                                <label for="name" class="form-label">@L("DbType")</label>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input id="surname" type="text" name="Color" value="@Model.Environment.Color"  required maxlength="32" class="validate form-control">
                                <label for="surname" class="form-label">@L("Color")</label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row clearfix">
                    <div class="col-sm-12">
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" name="Order" value="@Model.Environment.Order"  class="form-control" required maxlength="2000" />
                                <label class="form-label">@L("Order")</label>
                            </div>
                        </div>
                    </div>
                </div>

            </div>

        </div>
    </form>
</div>

@await Html.PartialAsync("~/Views/Shared/Modals/_ModalFooterWithSaveAndCancel.cshtml")

<script src="~/view-resources/Views/Projects/_EditEnvironmentModal.js" asp-append-version="true"></script>
